<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>The DirectoryIterator class</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="callbackfilteriterator.construct.html">CallbackFilterIterator::__construct</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="directoryiterator.construct.html">DirectoryIterator::__construct</a></div>
 <div class="up"><a href="spl.iterators.html">迭代器</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="class.directoryiterator" class="reference">
 <h1 class="title">The DirectoryIterator class</h1>
 
 
 <div class="partintro"><p class="verinfo">(PHP 5)</p>
 

  <div class="section" id="directoryiterator.intro">
   <h2 class="title">简介</h2>
   <p class="para">
    The DirectoryIterator class provides a simple interface for viewing
    the contents of filesystem directories.
   </p>
  </div>

 
  <div class="section" id="directoryiterator.synopsis">
   <h2 class="title">类摘要</h2>
 

   <div class="classsynopsis">
    <div class="ooclass"></div>
 

    <div class="classsynopsisinfo">
     <span class="ooclass">
      <strong class="classname">DirectoryIterator</strong>
     </span>

     <span class="ooclass">
      <span class="modifier">extends</span>
      <a href="class.splfileinfo.html" class="classname">SplFileInfo</a>
     </span>

     <span class="oointerface">implements 
      <span class="interfacename"><a href="class.seekableiterator.html" class="interfacename">SeekableIterator</a></span>
     </span>
 
     {</div>

 
    
 
    <div class="classsynopsisinfo classsynopsisinfo_comment">/* 方法 */</div>
    <div class="constructorsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><a href="directoryiterator.construct.html" class="methodname">__construct</a></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$path</code></span>
   )</div>

    <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">DirectoryIterator</span><span class="methodname"><a href="directoryiterator.current.html" class="methodname">current</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">int</span><span class="methodname"><a href="directoryiterator.getatime.html" class="methodname">getATime</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span>
   <span class="type">string</span>
   <span class="methodname"><a href="directoryiterator.getbasename.html" class="methodname">getBasename</a></span>
    ([ <span class="methodparam">
    <span class="type">string</span>
     <code class="parameter">$suffix</code>
   </span>
  ] )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">int</span><span class="methodname"><a href="directoryiterator.getctime.html" class="methodname">getCTime</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">string</span><span class="methodname"><a href="directoryiterator.getextension.html" class="methodname">getExtension</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">string</span><span class="methodname"><a href="directoryiterator.getfilename.html" class="methodname">getFilename</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">int</span><span class="methodname"><a href="directoryiterator.getgroup.html" class="methodname">getGroup</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">int</span><span class="methodname"><a href="directoryiterator.getinode.html" class="methodname">getInode</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">int</span><span class="methodname"><a href="directoryiterator.getmtime.html" class="methodname">getMTime</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">int</span><span class="methodname"><a href="directoryiterator.getowner.html" class="methodname">getOwner</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">string</span><span class="methodname"><a href="directoryiterator.getpath.html" class="methodname">getPath</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">string</span><span class="methodname"><a href="directoryiterator.getpathname.html" class="methodname">getPathname</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">int</span><span class="methodname"><a href="directoryiterator.getperms.html" class="methodname">getPerms</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">int</span><span class="methodname"><a href="directoryiterator.getsize.html" class="methodname">getSize</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">string</span><span class="methodname"><a href="directoryiterator.gettype.html" class="methodname">getType</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">bool</span><span class="methodname"><a href="directoryiterator.isdir.html" class="methodname">isDir</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">bool</span><span class="methodname"><a href="directoryiterator.isdot.html" class="methodname">isDot</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">bool</span><span class="methodname"><a href="directoryiterator.isexecutable.html" class="methodname">isExecutable</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">bool</span><span class="methodname"><a href="directoryiterator.isfile.html" class="methodname">isFile</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">bool</span><span class="methodname"><a href="directoryiterator.islink.html" class="methodname">isLink</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">bool</span><span class="methodname"><a href="directoryiterator.isreadable.html" class="methodname">isReadable</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">bool</span><span class="methodname"><a href="directoryiterator.iswritable.html" class="methodname">isWritable</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">string</span> <span class="methodname"><a href="directoryiterator.key.html" class="methodname">key</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">void</span> <span class="methodname"><a href="directoryiterator.next.html" class="methodname">next</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">void</span><span class="methodname"><a href="directoryiterator.rewind.html" class="methodname">rewind</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span>
   <span class="type">void</span>
   <span class="methodname"><a href="directoryiterator.seek.html" class="methodname">seek</a></span>
    ( <span class="methodparam"><span class="type">int</span> <code class="parameter">$position</code></span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span>
   <span class="type">string</span>
   <span class="methodname"><a href="directoryiterator.tostring.html" class="methodname">__toString</a></span>
    ( <span class="methodparam">void</span>
   )</div>
<div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">bool</span><span class="methodname"><a href="directoryiterator.valid.html" class="methodname">valid</a></span>
    ( <span class="methodparam">void</span>
   )</div>

   }</div>
 
  </div>
 


  
  <div class="section" id="directoryiterator.changelog">
   <h2 class="title">更新日志</h2>
   <p class="para">
    <table class="doctable informaltable">
     
      <thead>
       <tr>
        <th>版本</th>
        <th>说明</th>
       </tr>

      </thead>

      <tbody class="tbody">
       <tr>
        <td>5.1.2</td>
        <td>
         <strong class="classname">DirectoryIterator</strong> extends <a href="class.splfileinfo.html" class="classname">SplFileInfo</a>.
        </td>
       </tr>

      </tbody>
     
    </table>

   </p>
  </div>
  
 
 </div>
 
 








































































































































































 
<h2>Table of Contents</h2><ul class="chunklist chunklist_reference"><li><a href="directoryiterator.construct.html">DirectoryIterator::__construct</a> — Constructs a new directory iterator from a path</li><li><a href="directoryiterator.current.html">DirectoryIterator::current</a> — Return the current DirectoryIterator item.</li><li><a href="directoryiterator.getatime.html">DirectoryIterator::getATime</a> — Get last access time of the current DirectoryIterator item</li><li><a href="directoryiterator.getbasename.html">DirectoryIterator::getBasename</a> — Get base name of current DirectoryIterator item.</li><li><a href="directoryiterator.getctime.html">DirectoryIterator::getCTime</a> — Get inode change time of the current DirectoryIterator item</li><li><a href="directoryiterator.getextension.html">DirectoryIterator::getExtension</a> — Gets the file extension</li><li><a href="directoryiterator.getfilename.html">DirectoryIterator::getFilename</a> — Return file name of current DirectoryIterator item.</li><li><a href="directoryiterator.getgroup.html">DirectoryIterator::getGroup</a> — Get group for the current DirectoryIterator item</li><li><a href="directoryiterator.getinode.html">DirectoryIterator::getInode</a> — Get inode for the current DirectoryIterator item</li><li><a href="directoryiterator.getmtime.html">DirectoryIterator::getMTime</a> — Get last modification time of current DirectoryIterator item</li><li><a href="directoryiterator.getowner.html">DirectoryIterator::getOwner</a> — Get owner of current DirectoryIterator item</li><li><a href="directoryiterator.getpath.html">DirectoryIterator::getPath</a> — Get path of current Iterator item without filename</li><li><a href="directoryiterator.getpathname.html">DirectoryIterator::getPathname</a> — Return path and file name of current DirectoryIterator item</li><li><a href="directoryiterator.getperms.html">DirectoryIterator::getPerms</a> — Get the permissions of current DirectoryIterator item</li><li><a href="directoryiterator.getsize.html">DirectoryIterator::getSize</a> — Get size of current DirectoryIterator item</li><li><a href="directoryiterator.gettype.html">DirectoryIterator::getType</a> — Determine the type of the current DirectoryIterator item</li><li><a href="directoryiterator.isdir.html">DirectoryIterator::isDir</a> — Determine if current DirectoryIterator item is a directory</li><li><a href="directoryiterator.isdot.html">DirectoryIterator::isDot</a> — Determine if current DirectoryIterator item is '.' or '..'</li><li><a href="directoryiterator.isexecutable.html">DirectoryIterator::isExecutable</a> — Determine if current DirectoryIterator item is executable</li><li><a href="directoryiterator.isfile.html">DirectoryIterator::isFile</a> — Determine if current DirectoryIterator item is a regular file</li><li><a href="directoryiterator.islink.html">DirectoryIterator::isLink</a> — Determine if current DirectoryIterator item is a symbolic link</li><li><a href="directoryiterator.isreadable.html">DirectoryIterator::isReadable</a> — Determine if current DirectoryIterator item can be read</li><li><a href="directoryiterator.iswritable.html">DirectoryIterator::isWritable</a> — Determine if current DirectoryIterator item can be written to</li><li><a href="directoryiterator.key.html">DirectoryIterator::key</a> — Return the key for the current DirectoryIterator item</li><li><a href="directoryiterator.next.html">DirectoryIterator::next</a> — Move forward to next DirectoryIterator item</li><li><a href="directoryiterator.rewind.html">DirectoryIterator::rewind</a> — Rewind the DirectoryIterator back to the start</li><li><a href="directoryiterator.seek.html">DirectoryIterator::seek</a> — Seek to a DirectoryIterator item</li><li><a href="directoryiterator.tostring.html">DirectoryIterator::__toString</a> — Get file name as a string</li><li><a href="directoryiterator.valid.html">DirectoryIterator::valid</a> — Check whether current DirectoryIterator position is a valid file</li></ul>
</div>
<hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="callbackfilteriterator.construct.html">CallbackFilterIterator::__construct</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="directoryiterator.construct.html">DirectoryIterator::__construct</a></div>
 <div class="up"><a href="spl.iterators.html">迭代器</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
